<template>
  <div class="info-wrap">
    <Title title="更多运营信息" style="font-size:16px; margin:10px 0 16px 0"/>
    <el-form
      ref="formRef"
      :model="formData"
      :label-width="labelWidth"
      :label-position="showMobilePage ? 'left' : 'right'"
      class="lineHeight32">
      <el-row :class="{'response-create-row': !dialog, 'flex-wrap': dialog}">
        <el-col :span="rowSpan" class="responsive-col-lg-8">
          <el-form-item label="报价有效期" prop="guaranteePrice">
            <el-date-picker
              v-model="formData.morePriceInfo.priceTime"
              type="daterange"
              align="right"
              size="small"
              class="width240"
              value-format="timestamp"
              unlink-panels
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              format="yyyy/MM/dd" />
          </el-form-item>
        </el-col>
        <el-col :span="rowSpan" class="responsive-col-lg-8">
          <el-form-item label="支付方式">
            <el-input v-model="formData.otherInfo.payMethod" :maxlength="50" resize="none" class="width240" placeholder="请输入内容" type="text" size="small" />
          </el-form-item>
        </el-col>
        <el-col :span="rowSpan" class="label-collapse responsive-col-lg-8">
          <el-form-item label="主体名(即对方公司全称)">
            <el-input v-model="formData.otherInfo.mainName" :maxlength="50" resize="none" class="width240" placeholder="请输入内容" type="text" size="small" />
          </el-form-item>
        </el-col>
        <el-col :span="rowSpan" class="responsive-col-lg-8">
          <el-form-item label="票面税点">
            <el-input
              v-model="formData.otherInfo.taxPoint"
              name="deductionRate"
              class="width240"
              size="small"
              placeholder="请输入内容"
              type="number"
              oninput="if(value>9999999999)value=9999999999;if(value<0)value=0;"
              @change="numberInputChange('taxPoint')"
            >
              <span slot="suffix" class="suffix">%</span>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="rowSpan" class="responsive-col-lg-8">
          <el-form-item label="实际税点">
            <el-input
              v-model="formData.otherInfo.actualTaxPoint"
              name="deductionRate"
              class="width240"
              size="small"
              placeholder="请输入内容"
              type="number"
              oninput="if(value>9999999999)value=9999999999;if(value<0)value=0;"
              @change="numberInputChange('actualTaxPoint')"
            >
              <span slot="suffix" class="suffix">%</span>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="rowSpan" class="responsive-col-lg-8">
          <el-form-item label="所属机构">
            <el-input v-model="formData.otherInfo.organization" :maxlength="50" resize="none" class="width240" placeholder="请输入内容" type="text" size="small" />
          </el-form-item>
        </el-col>
        <el-col :span="rowSpan" class="responsive-col-lg-8">
          <el-form-item label="商务联系人">
            <el-input v-model="formData.otherInfo.businessContact" :maxlength="50" resize="none" class="width240" placeholder="请输入内容" type="text" size="small" />
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
<script>
import mixins from './mixins';
export default {
  mixins: [mixins],
  model: {
    prop: 'modelData',
    event: 'changeValue'
  },
  props: {
    modelData: {
      type: Object,
      default: () => ({})
    },
    rowSpan: {
      type: Number,
      default: 12
    }
  },
  methods: {
    numberInputChange(key) {
      if (this.formData.otherInfo[key]) this.formData.otherInfo[key] = Number(this.formData.otherInfo[key]).toFixed(2);
    }
  }
};
</script>
